<%@page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common/taglib.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>${page.pageName}</title>
<%@include file="/common/public.jsp"%>
<link rel="stylesheet" type="text/css" href="${ctx}/css/main.css">
<link rel="stylesheet" type="text/css" href="${ctx}/css/query.css">
<script type="text/javascript">
window.Parent = window.dialogArguments;
window.Action = {};
Action.save = function(){
	jQuery("form:first").submit();
};
Action.complete = function(id){
	if( jQuery("#id").val() == ""){
		jQuery("#id").val(id);//新增完成获取ID
		var text = $V("templetName") + "[" + $V("mainPage")+ "][" + $V("resultPage") + "]";
		Parent["Action"].addQueryTemplet({value:id,text:text});
	}
};
</script>
</head>
<body>
<e:form name="EditForm" action="/page/config/queryTempletSave.do">
<e:hidden name="id" value="${bean.templetId}"/>
<table class="etable">
	<tr>
		<td class="tl">模板名称：</td>
		<td class="tc" colspan="3">
			<e:text name="templetName" className="input" validate="{required:true,maxlength:128}" value="${bean.templetName}" style="width:100%;">
				<e:param name="defValue" value=""/>
			</e:text>
		</td>
	</tr>
	<tr>
		<td class="tl">查询主页面：</td>
		<td class="tc" colspan="3">
			<e:text name="mainPage" className="input" validate="{required:true,maxlength:128}" value="${bean.mainPage}" style="width:100%;">
				<e:param name="defValue" value=""/>
			</e:text>
		</td>
	</tr>
	<tr>
		<td class="tl">查询结果页面：</td>
		<td class="tc" colspan="3">
			<e:text name="resultPage" className="input" validate="{required:true,maxlength:128}" value="${bean.resultPage}" style="width:100%;">
				<e:param name="defValue" value=""/>
			</e:text>
		</td>
	</tr>
	<tr>
		<td class="tl">模板说明：</td>
		<td class="tc" colspan="3">
			<e:textarea name="templetDesc" style="width:100%; height:200px" value="${bean.templetDesc}" validate="{required:false}"/>
		</td>
	</tr>
	<tr>
		<td align="center" colspan="4" height="30">
		<input id="SaveButton" type="button" class="btn_orange_b2" value="保 存" onClick="Action.save()"/>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input id="SaveButton" type="button" class="btn_blue_b2" value="关 闭" onClick="window.close()"/>
		</td>
	</tr>
</table>
</e:form>
</body>
</html>